#!/bin/sh

#while [ 1 ]
#do
#	for dev in `ls /dev/sd* | grep -v sda | grep -v sdb`
	for dev in `bwrm_pdscan | awk -F ":" '{print $13}'`
	do
		state=1
		ret=`hdparm -C $dev | grep state | awk '{print $4}'`
		if [ $? -ne 0 ]
		then
			echo "Failed: hdparm -C $dev | grep state | awk '{print $4}'"
		fi
		if [ $ret == "standby" ]
		then
			state=0
		fi
		echo "$dev:$state"
	done
#	sleep 5
#done

